package com.fowo.api.datainterface.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;


@Data
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
public class DatainterfaceLogModel implements Serializable {
    /**
     * 日志类型 (0 - 正常; 1 - 异常; )
     */
    @Schema(title = "日志类型")
    private String logType;

    /**
     * 业务唯一编码
     */
    @Schema(title = "业务唯一编码")
    private String businessId;

    /**
     * 业务关键字段
     */
    @Schema(title = "业务关键字段")
    private String businessKeywords;

    /**
     * 调用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "调用时间")
    private java.util.Date businessTime;

    /**
     * 请求类型 (retrySuccess - 数据重试成功; dataError - 数据异常; taskError - 事务异常; )
     */
    @Schema(title = "请求类型")
    private String businessType;
    /**
     * 异常信息
     */
    @Schema(title = "异常信息")
    private String exceptionContent;


    /**
     * 请求耗时
     */
    @Schema(title = "请求耗时")
    private Long invokWasteTime;

}
